import Instance from '@/utils/http.ts';

export function getRoleInfoAPI(id:number){
    return Instance({
        url:`/user-role/getByUserId`,
        method:'GET',
        params:{
            userId:id,
            current:1,
            pageSize:100,
        }
    })
}

// 获取所有角色信息
export function getAllRoleAPI(){
    return Instance({
        url:`/sys-role/getAll`,
        method:'GET',
    })
}

// 通过usId获取角色信息
export function getRoleByUserIdAPI(id:number){
    return Instance({
        url:`/user-role/getByUserId`,
        method:'GET',
        params:{
            userId:id,
            current:1,
            pageSize:100,
        }
    })
}
